<?php
namespace app\component\selectUser;

use app\entity\User;
use app\repository\UserRepository;
use app\service\TemplateService;

class SelectUserComponent {

    public static function render($userId = null) {
        $users = UserRepository::findAllUsers();
        return TemplateService::render('selectUserComponent.html', [
            'users' => $users, 
            'userId' => $userId
        ]);
    }
}